package com.smartstate.dataArchives.constant;

import com.smartstate.common.web.enums.IKeyValueObject;

import java.util.HashMap;
import java.util.Map;

/**
 * 人员状态
 */
public enum StatusEnum implements IKeyValueObject {
  /**
   * status
   */
  READY(1,"到岗"),
  DISPATCHED(2,"出差"),
  EXECUTING(3,"开会"),
  FINISHED(4,"请假");

  private Integer code;
  private String name;

  StatusEnum(int code,String name) {
    this.code = code;
    this.name = name;
  }

  @Override
  public Integer getCode() {
    return this.code;
  }

  @Override
  public String getName() {
    return this.name;
  }
  public static Map<String, Integer> typeMap = new HashMap<String, Integer>();


  static {
    StatusEnum[] types = StatusEnum.values();
    for (StatusEnum type : types) {
      typeMap.put(String.valueOf(type.name), type.code);
    }
  }
}
